<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../img/base.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/jquery-1.8.2.min.js"></script>
<script language="javascript">
function del(cal_id)
{
	var check_del = window.confirm('确定删除？');
	if(check_del)
	{
		window.location = "price_ploy_cal_list.php?mc_cinemaid=<{$cinemaid}>&period_id=<{$period_id}>&op=delete&ploy_id=<{$ploy_id}>&cal_id="+cal_id;
	}
}
</script>
</head>
<body leftmargin='15' topmargin='10' bgcolor="#FFFFFF">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1" style="border-bottom:1px solid #CCCCCC">
  	<tr>
    	<td colspan="2">
        	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA">
            	<tr>
                	<td height="28" background="../img/tbg.gif">
                    	<div style="float:right;padding-right:6px;">
                            <a href='price_ploy_cal_list.php?mc_cinemaid=<{$cinemaid}>&period_id=<{$period_id}>&ploy_id=<{$ploy_id}>&op=add' class='np coolbg'>添加</a>
                            <a href='price_ploy_index.php?mc_cinemaid=<{$cinemaid}>&period_id=<{$period_id}>' class='np coolbg'>返回</a>
                        </div>
                    </td>
                </tr>
            </table>
      		<table width="800" border="0" cellpadding="0" cellspacing="0">
        		<tr>
          			<td width="84" height="24" align="center" background="../img/itemnote1.gif">&nbsp;计算公式&nbsp;</td>
          			<td width="84"></td>
          			<td>标准价：standard_price ，最低限价：lowest_price</td>
        		</tr>
      		</table>
            
    	</td>
	</tr>
</table>
<form name="form1" action="price_ploy_cal_list.php" method="post">
<table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="needset">
	<tr>
    	<td width="80" height="24" class="bline"><strong>
   		  	ID
    	</strong></td>
        <td width="80" class="bline"><strong>
   			影院
    	</strong></td>
       <td width="100" class="bline"><strong>
   			时间段
    	</strong></td>
        <td width="60" class="bline"><strong>
   			渠道
    	</strong></td>
        <td width="100" class="bline"><strong>
   			策略
    	</strong></td>
        <td width="100" class="bline"><strong>
            模型
        </strong></td>
        <td width="100" class="bline"><strong>
            字段
        </strong></td>
        <td width="100" class="bline"><strong>
            计算顺序（值小的先计算）
        </strong></td>
        <td width="200" class="bline"><strong>
      		公式
    	</strong></td>
        <td class="bline"><strong>
      		最低限价（1代表执行最低限价）
    	</strong></td>
        <td class="bline">操作
   	  </td>
  	</tr>
<{foreach item=cal from=$cal_list}>
  	<tr>
    	<td height="24" class="bline">
      		<{$cal.cal_id}><input name="cal_ids[]" type="hidden" value="<{$cal.cal_id}>" />
    	</td>
        <td class="bline">
      		<{$cal.cinemaid}>
    	</td>
        <td class="bline">
      		<{$cal.period_name}>
    	</td>
        <td class="bline">
      		<{$cal.purchase_way}>
    	</td>
        <td class="bline">
      		<{$cal.ploy_name}>
    	</td>
        <td class="bline">
      		<{$cal.model_name}>
    	</td>
        <td class="bline">
      		<{$cal.model_field}>
    	</td>
        <td class="bline">
	    	<input name="cal_priority_<{$cal.cal_id}>" type="text" value="<{$cal.cal_priority}>" size="8" />
        </td>
        <td class="bline">
        	<input name="cal_formula_<{$cal.cal_id}>" type="text" value="<{$cal.cal_formula}>" size="40" />
    	</td>
        <td class="bline">
        	<input name="compare_lowest_<{$cal.cal_id}>" type="checkbox" value="1" <{if $cal.compare_lowest==1}>checked="checked"<{/if}> />是
    	</td>
        <td class="bline"><a href="javascript:;" onClick="del(<{$cal.cal_id}>);">删除</a>
   	  	</td>
  	</tr>
<{/foreach}>
</table>
<table width="97%" border="0" cellspacing="0" cellpadding="0" >
    <tr>
        <td height="10">
        </td>
    </tr>
</table>
<table width="97%" border="0" cellspacing="0" cellpadding="0" >
    <tr>
        <td width="200">&nbsp;
        </td>
        <td>
        	<input type="hidden" name="op" value="save" />
            <input type="hidden" name="ploy_id" value="<{$ploy_id}>" />
			<input type="hidden" name="mc_cinemaid" value="<{$cinemaid}>" />
			<input type="hidden" name="period_id" value="<{$period_id}>" />
            <input name="imageField" type="image" src="../img/button_ok.gif" width="60" height="22" class="np" border="0" style="cursor:pointer; ">
            &nbsp;&nbsp;&nbsp;&nbsp;
            <img src="../img/button_reset.gif" width="60" height="22" border="0" onClick="location.reload();" style="cursor:pointer; ">
        </td>
    </tr>
</table>

</form>
</body>
</html>